var objJSON={};
var myForm = document.getElementById("myForm");
for(var i = 0; i<myForm.elements.length;i++){
    var element=myForm.elements[i];
    if(element.type=='text'||element.type=='radio' || element.type=='select-one'|| element.type=='select'){
        objJSON[element.name]=element.value;
    }
}
alert(objJSON);
alert($.toJSON(objJSON));
